import java.io.IOException;
import java.net.UnknownHostException;

import Interfaces.IAgentHandler;


public class Client {

	public static void main(String[] args) 
	{
		try 
		{
			// Create management listener (listens to agents discovery messages)
			ManagmentChannelListener MClistener = new ManagmentChannelListener("225.4.5.6", 5000);
			
			// Create agents handler and add it to the 
			IAgentHandler handler = new AgentHandler();
			MClistener.AddNewAgentsHandler(handler);
			MClistener.startListening();		
		} 
		catch (UnknownHostException e) 
		{
			// TODO Auto-generated catch block
			e.printStackTrace();
		} 
		catch (IOException e) 
		{
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

}
